import myaxios from '../MyAxios';
import BASEURL from '@/http/BaseUrl';
var BMDURL = BASEURL.BMDURL

const loginApi = {
    /**
     * 
     * @param {obj} params {pwd:123456,phone:13512345678} 
     */
    queryuser(params){
        let url = BMDURL + '/login/user'
        return myaxios.post(url,params)
    },

    /**
     * @param {obj} params {pwd:xxx,phone:xxx,nickname:xxx} 
     */
    queryAddUser(params){
        let url = BMDURL + '/login/user-reg'
        return myaxios.post(url,params)
    },

    /**
     * @param {obj} params {pwd:123456,phone:13512345678}
     */
    changeUser(params){
        let url = BMDURL + '/login/forget'
        return myaxios.post(url,params)
    },

    /**
     * @param {obj} params {pwd:123456,phone:13512345678}
     */
    selectAll(){
        let url = BMDURL + '/login/user-phone'
        return myaxios.get(url)
    },

    /**
     * @param {obj} params {phone:xxxx}
     */
    queryPhone(params){
        let url = BMDURL + '/login/api/code'
        return myaxios.post(url,params)
    }
}
export default loginApi